<!--
 * @Author: your name
 * @Date: 2021-06-16 11:59:12
 * @LastEditTime: 2021-06-16 14:05:21
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vueDemo\05-指令-条件渲染.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>条件渲染</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
</head>
<body>
    <div id="div">
        <div v-if="num % 3 == 0">div1</div>
        <div v-else-if="num % 3 == 1">div2</div>
        <div v-else = "num % 3 == 2">div3</div>
        
        <div v-show = "flag">div4</div>
    </div>
    <script>
        new Vue({
            el:"#div",
            data:{
                num:5,
                flag:false
            }
        });
    </script>
</body>
</html>